--[[ 编码: JX-800-06 名称: 总数 作者:SGX 日期:2025-1-29 函数: GenerateViewHTML 功能: 更改记录: --]] json = require("json") mobox = require("OILua_JavelinExt") m3 = require("oi_base_mobox") function GenerateViewHTML(strLuaDEID) local nRet, strRetInfo --[[ 方块1 ]] local strFKTitle1 = "年度入库总量"; local strFKData1 = "30000"; local strFKBack1 = "#8BC34A"; --[[ 方块2 ]] local strFKTitle2 = "年度出库总量"; local strFKData2 = "25000"; local strFKBack2 = "#FF9800"; local strHtml = '
' .. '
' .. '
' .. strFKTitle1 .. '
' .. '
' .. strFKData1 .. '
' .. '
' .. '
' .. '
' .. strFKTitle2 .. '
' .. '
' .. strFKData2 .. '
' .. '
' .. '
' local action = {} action[1] = { action_type = "chart", value = { graphicType = "html", title = { text = "总数", align = "center", color = "#000", font = "微软雅黑", fontSize = 16 }, html = strHtml } } nRet, strRetInfo = mobox.setAction(strLuaDEID, lua.table2str(action)) if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "setAction失败! " .. strRetInfo .. ' action = ' .. strAction) end end